//
//  UIApplication+event.m
//  Test
//
//  Created by xueshan1 on 2019/6/5.
//  Copyright © 2019 xueshan1. All rights reserved.
//

#import "UIApplication+event.h"
#import "NSObject+swizzle.h"
@implementation UIApplication (event)

//+ (void)load{
//    static dispatch_once_t onceToken;
//    dispatch_once(&onceToken, ^{
//        [self swizzleInstanceMethod:@selector(sendEvent:) newSelector:@selector(my_sendEvent:) class:[self class]];
//    });
//}
//- (void)my_sendEvent:(UIEvent *)event{
//
//    UITouch *touch = [event.allTouches anyObject];
//    if (touch.phase == UITouchPhaseBegan) {
//        CGPoint point = [touch locationInView:[UIApplication sharedApplication].keyWindow];
////        NSLog(@"app begin:%@",NSStringFromCGPoint(point));
//    }else if (touch.phase == UITouchPhaseMoved){
//
//    }else if (touch.phase == UITouchPhaseEnded){
//        CGPoint point = [touch locationInView:[UIApplication sharedApplication].keyWindow];
////        NSLog(@"app end:%@",NSStringFromCGPoint(point));
//    }
//
//    [self my_sendEvent:event];
//}


@end
